<include file="./Application/Admin/View/Public/htmlheader.html"/>
<include file="./Application/Admin/View/Public/header.html"/>
<include file="./Application/Admin/View/Public/left.html"/>

<ol class="breadcrumb">
    <li><a href="/Admin">首页</a></li>
    <li class="active">Cms列表</li>
</ol>
<div class="row">
    <div class="col-lg-12">
        <div class="table-responsive">
            <table class="table table-hover table-bordered">
                <tr class="success">
                    <th>图片</th>
                    <th>标题</th>
                    <th>摘要</th>
                    <th>类型</th>
                    <th>操作</th>
                </tr>
                <volist name="list" id="vo" empty="暂时没有数据">
                    <tr>
                        <td><img src="{$vo.image}" height="50" /></td>
                        <td>{$vo.title}</td>
                        <td>{$vo.description}</td>
                        <td>
                            <if condition="$vo['type'] eq 1">
                                产品特色
                                <else />
                                使用帮助
                            </if>
                        </td>
                        <td>
                            <if condition="$permission['editNews'] eq TRUE">
                                <a href="__ROOT__/Admin/Cms/editNews?id={$vo['id']}" class="btn btn-info btn-xs">编辑</a>
                            </if>

                        </td>
                    </tr>
                </volist>
            </table>
            <div class="row">
                <div class="col-lg-3">
                    <if condition="$permission['addBind'] eq TRUE">
                    <button class="btn btn-primary" data-toggle="modal" data-target="#addRoom">绑定直播间</button>
                    </if>
                </div>
                <div class="col-lg-9 text-center">
                    <nav>{$page}</nav>
                </div>
            </div>

        </div>
    </div>
</div>
<!--   绑定直播间 弹出层   -->
<div class="modal fade" id="addRoom" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">绑定直播间</h4>
            </div>
            <form action="__ROOT__/Admin/Room/addBind" method="post">
                <div class="modal-body">
                    <div class="row">
                        <div class="col-lg-3 text-right"><p><span class="red">*</span>所属教师：</p></div>
                        <div class="col-lg-9">
                            <select class="form-control" name="teacherId">
                                <foreach name="teacherList" item="vo">
                                    <option value="{$vo.id}">{$vo.name}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class="col-lg-3 text-right"><p><span class="red">*</span>直播间：</p></div>
                        <div class="col-lg-9">
                            <select class="form-control" name="roomId">
                                <foreach name="roomList" item="vo">
                                    <option value="{$vo.id}">{$vo.name}</option>
                                </foreach>

                            </select>
                        </div>
                    </div>
                    <br/>

                    <div class="row">
                        <div class="col-lg-3 text-right"><p><span class="red">*</span>直播地址：</p></div>
                        <div class="col-lg-9">
                            <select class="form-control" name="liveUrlId">
                                <foreach name="liveUrlList" item="vo">
                                    <option value="{$vo.id}">{$vo.address}{$vo.channel}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class="col-lg-3 text-right"><p>备注：</p></div>
                        <div class="col-lg-9"><input type="text" name="remark" value="" class="form-control"/></div>
                    </div>
                    <br/>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </form>
        </div>
    </div>
</div>
<include file="./Application/Admin/View/Public/footer.html"/>